# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  
  def blog_post_url(post)
    "/blog/#{post.published_at.year}/#{post.published_at.month}/#{post.published_at.day}/#{post.stub_name}"
  end
  
  def category_url(tag)
    "/blog/category/#{tag.stub_name}"
  end
  
  def title(title)
    "<h2>#{title.to_s}</h2>"
  end
  
  def currency_format(num)
    "<span class=\"quiet\">$</span>&#8202;" + number_with_delimiter(number_with_precision(num,2)).to_s
  end
  
  
end
